const Base = require('./base.js')
const version = 'v1.0'
module.exports = class extends Base {
  indexAction () {
    yy.log.info(version)
    this.body = version
  }
  async testCacheAction () {
    const a = { b: 1, c: 2 }
    await think.cache('a', a)
    const cb = await think.cache('a')
    yy.log.debug(typeof cb)
    this.body = cb
  }
  async testDbAction () {
    let d = 1
    d = await yy.model('dbtest').add({ a: 1 })
    this.body = d
  }
}
